﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common
{
   public class Work
    {
       
       public int ID { get; set; }
       //Код другий
       public string Code { get; set; }
       //Назва кода першого
       public string NameOrigin { get; set; }
       //Код перший
       public string CodeOrigin { get; set; }
       //Назва кода другого
       public string NameCode { get; set; }
       //Вид робіт
       public string TypeWork { get; set; }
       //Диспетчерська назва
       public string DispatcherName { get; set; }
       //Згідно документа
       public string AccorDocument { get; set; }

       public Dictionary<string, string> DispatcherNameFields { get; private set; }
       public Dictionary<string, string> RefWorkFields { get; private set; }
       public Dictionary<string, string> DocumentationFields { get; private set; }
       public Dictionary<string, string> WorkFields { get; private set; }


       Work() { }

       Work(string code, string nameOrigin, string codeOrigin, string nameCode, string typeWork, string dispatcherName, string accorDocumentation) 
           : this(0, code, nameOrigin, codeOrigin, nameCode, typeWork, dispatcherName,  accorDocumentation) { }
       Work(int id, string code, string nameOrigin, string codeOrigin, string nameCode, string typeWork, string dispatcherName, string accorDocumentation) 
       {
           this.ID = id;
           this.Code = code;
           this.NameOrigin = nameOrigin;
           this.CodeOrigin = codeOrigin;
           this.NameCode = nameCode;
           this.TypeWork = typeWork;
           this.DispatcherName = dispatcherName;
           this.AccorDocument = accorDocumentation;

           RefWorkFields = new Dictionary<string,string>(1);
           RefWorkFields.Add("TypeWork",TypeWork);

           DispatcherNameFields = new Dictionary<string, string>(1);
           DispatcherNameFields.Add("NameCode", NameCode);

           DocumentationFields = new Dictionary<string, string>(1);
           DocumentationFields.Add("AccorDocument", AccorDocument);

           WorkFields = new Dictionary<string, string>(1);
           WorkFields.Add("Code", Code);
           WorkFields.Add("NameOrigin", NameOrigin);
           WorkFields.Add("CodeOrigin", CodeOrigin);
           WorkFields.Add("NameCode", NameCode);

       }

    }
}
